.
docker top mymysqlView the process information of the container mymysql.for i inDocker PS | grep up | awk '{print $1 }';do echo \ docker top $i; doneView the process information of all running containers.4. docker attach
Docker attach: connect to a running container.docker attach [OPTIONS] CONTAINERThe container to a
immediate exit of the current program.5.4 Loading BuiltinsAfter setting the processing method for the specific signal of the trap for Eng, the Docker daemon implements the Builtins load. The code is implemented as follows:If err: = Builtins. Register (Eng); Err! = Nil {log. Fatal (ERR)}The main task of loading builtins is to register multiple handler for the engine so that the specified handler can be run later when the corresponding task is performe
Diff
Export
Images
Import/save/load
Inspect
Kill
Port
Pause/unpause
Ps
Rm
Rmi
Run
Start/stop/restart
Tag
Top
Wait
Log information related
Events
History
Logs
Docker Hub Service Related
Login
Pul
ServicesNode Manage Docker Swarm nodes
System Operation:
Version show the Docker version informationEvents get real time events from the server (continuous return Docker event)Info Display system-wide information (displays Docker host system-wide information)
Some of the
Containers Update Update Co Nfiguration of one or more containers. Until a container stops, then print its exit code attach attach to a R unning container exec Run a command in a running container port List port mappings or a specific for the mapping Iner logs gets the container's log container file system operation: CP Copy files/folders between a container and the local filesystem diff Inspect Chan GES on a container ' s filesystem export export a container ' s filesystem as a tar archive imp
http://segmentfault.com/a/1190000000751601This article only records the use of Docker commands in most situations, and if you want to know the details of each option, please refer to the official documentation, which is recorded only as a later memo.According to their own understanding, generally divided into the following types:
Container Life cycle Management-docker [run|start|stop|restart|kill|r
provides a very powerful command diff that lists the files and directories that have changed within the container. These changes include add (a-add), delete (D-delete), modify (C-change). This command facilitates debug and enables fast sharing of the environment.The syntax is:
Docker diff container
Displays the execution of the diff.vents:Prints real-time system events for containers within a
the container Diff Inspect Changes on a container ' s filesystem # View Docker container change events Get Real time events from the SER Ver # get container real-time event from Docker service exec run a command in an existing container # run commands on existing containers export Stream the contents of a container
1 Background 1.1 Docker introductionDocker is a container engine project based on lightweight virtualization technology from Docker, the entire project is based on the go language and complies with the Apache 2.0 protocol. Today, Docker can quickly automate deployment of applications within the container, and can provide container resource isolation and security
latest status after saving.
# Save the changes to the container;-A, -- author = "" author;-M, -- message = "" Commit message $ docker commit ID new_image_name
Note: image is equivalent to a class, and container is equivalent to an instance. However, you can dynamically install new software for the instance, and then use the commit command to solidify the container into an image.
6. Operations on containers (RM, stop, start, kill, logs, diff, top, CP
Docker installation and sharing of common commands and sharing of common docker commands
Basic commands
1. To install docker in yum, the root permission is required.
Yum install docker
2. Start docker
Systemctl start docker. servi
history of the specified image.--no-trunc Display the complete submission record;-Q lists only the commit record IDs.Docker Start|stop|restart Docker start|stop "P" >|restart [Options "O";] Starts, stops, and restarts one or more specified containers.-A pending completion-I launches a container and enters interactive mode;-T 10 time-out (in seconds) to stop or restart the container and the system will kill the process after a timeout.Docker kill
=falseRemove the specified link and not the underlying container; -V,--volumes=falseRemove The volumes associated to the Container$docker RM Name/id# Stop, start, kill a container $docker stop Name/id$docker start Name/Id$docker Kill Name/id# log from a container;-F,--follow=falseFollow log output; -T,--timestamps=fals
Diff Inspect Changes on a container ' s filesystem # View Docker container changes events get real time events from the SER Ver # get container real-time event from Docker service exec run a command in a existing container # run commands on existing containers export Stream the contents of a container as a tar arch
-entrypoint.sh/rootAfter the modification is complete, copy the file back to the container# docker cp/root/docker-entrypoint.sh mysql:/usr/local/bin/ Create Create aNew Container--Create a new container, note that at this point, the status of the container is just created diff Inspect Changes on a container' s filesystem--View the changed files in the container, take my MySQL container as an example [[
/stderr)
Docker events # Get Real-time events of the docker Server
Docker port # display container port ing
Docker top # display container Process Information
Docker diff # display
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.